package RozetkaPages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;


/**
 * Created by Yulia on 05.04.14.
 */
public class SearchPage extends BasePage {

    private static final String PAGE_URL = "";

    private By category = By.cssSelector(".m-cat-title");

    public SearchPage(WebDriver driver)
    {
        super(driver,PAGE_URL);
    }

    public void open()
    {
        driver.get(pageUrl);
    }

    @Override
    public boolean isOpened()
    {
        return driver.findElement(category).isDisplayed();
    }

    public void addToBasket(String toBasket)
    {
        driver.findElement(By.xpath(toBasket)).click();
    }
}
